<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        // 定义正则表达式
        // var reg = /abc/i
        // var reg = new RegExp('abc','i')
        // var reg = /[a-z]\d{2}\w?/i
        // var reg = /^abc$/
        // var reg = /^(ab)|(cd)\d+$/
        // var reg = /[^abc]/
        var reg = /^\w+[\u4E00-\u9FA5]{2,}$/

        console.log(reg.test('abc汤小洋'));

    </script>
</head>
<body>

</body>
</html>